﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TruckWatch.Cloud.Models
{
    /// <summary>
    /// Note, this is used because otherwise a circular reference error occurs when using the Entity Framework generated model
    /// </summary>
    public class MessageModel
    {
        public int Id { get; set; }
        public int SenderDriverId { get; set; }
        public string SenderName { get; set; }
        public int RecipientDriverId { get; set; } //todo: make nullable (broadcast message)
        public string RecipientName { get; set; }
        public DateTime SendDate { get; set; }
        public int ConversationId { get; set; }
        public string MessageText { get; set; }
        public string MessageType { get; set; }
        public int? ParentMessageId { get; set; }
        public double? ResponderDistance { get; set; }
    }

    public enum MessageType
    {
        Normal = 0,
        Distress = 1,
        DistressResponse=2
    }
}
